package com.lancoo.znbkxx.teacher.aibkTestCoach.aibkDialog

import androidx.appcompat.app.AppCompatActivity
import java.util.ArrayList

object ShowDialogTools {

    //实现大图查看弹窗
     fun showBigImageDialog(activity: AppCompatActivity, path: String) {
        activity.runOnUiThread {
//            listener!!.onPauseMusic()//视情况而定，是否需要在显示大图的同时暂停当前所有音频的播放：本人暂认为无需暂停(ps:需要搭配监听一起使用)
//            var Path = "https://obs-lgresv56pc-yanyi.obs.cn-east-2.myhuaweicloud.com/lgRs/78e889779fa0449296487b91f16b4ada/41800ea5c2a648e5aacffda073b6962d.gif"
            val imagePath = ArrayList<String>()
            imagePath.add(path)
            val dialog = DialogBigImage(activity, activity, imagePath, 0)
            dialog.show()
            dialog.setClickDialogListener(object : DialogBigImage.onClickDialogListener {
                override fun onClickClose() {
                    dialog.dismiss()
                }
            })
        }
    }

//    interface onListener {
//        fun onPauseMusic()
//    }
//
//    private var listener: onListener? = null
//
//    fun setListener(listener: onListener?) {
//        this.listener = listener
//    }

    fun showQuesScoreInofrDialog(activity: AppCompatActivity, quesSocreInfor: String) {
        activity.runOnUiThread {
            val dialog = DialogQuesScoreInfor(activity, quesSocreInfor)
            dialog.show()
        }
    }

}